package com.xsmart.oa.api;


import com.xsmart.common.entity.RequestBean;
import com.xsmart.common.entity.ResponseBean;
import com.xsmart.oa.services.ShippingService;
import com.xsmart.oa.services.SystemPermissionListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api")
public class SystemPermissionListController {
    @Autowired
    SystemPermissionListService systemPermissionListService;

    @PostMapping(value = "v1/SystemPermissionListService/querySystemPermissionList")
    public ResponseBean querySystemPermissionList(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return systemPermissionListService.querySystemPermissionList(requestBean);
    }

    @PostMapping(value = "v1/SystemPermissionListService/addSystemPermissionList")
    public ResponseBean addSystemPermissionList(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return systemPermissionListService.addSystemPermissionList(requestBean);
    }

    @PostMapping(value = "v1/SystemPermissionListService/modSystemPermissionList")
    public ResponseBean modSystemPermissionList(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return systemPermissionListService.modSystemPermissionList(requestBean);
    }

    @PostMapping(value = "v1/SystemPermissionListService/delSystemPermissionList")
    public ResponseBean delSystemPermissionList(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return systemPermissionListService.delSystemPermissionList(requestBean);
    }

    @PostMapping(value = "v1/SystemPermissionListService/findParentNode")
    public ResponseBean findParentNode(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return systemPermissionListService.findParentNode(requestBean);
    }
}
